<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE BangPatterns, ExistentialQuantification #-}</span><span>
</span><span id="line-2"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- Module      : Data.Text.Internal.Fusion.Types</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- Copyright   : (c) Tom Harper 2008-2009,</span><span>
</span><span id="line-5"></span><span class="hs-comment">--               (c) Bryan O'Sullivan 2009,</span><span>
</span><span id="line-6"></span><span class="hs-comment">--               (c) Duncan Coutts 2009,</span><span>
</span><span id="line-7"></span><span class="hs-comment">--               (c) Jasper Van der Jeugt 2011</span><span>
</span><span id="line-8"></span><span class="hs-comment">--</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- License     : BSD-style</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Maintainer  : bos@serpentine.com</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Stability   : experimental</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Portability : GHC</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- /Warning/: this is an internal module, and does not have a stable</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- API or name. Functions in this module may not check or enforce</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- preconditions expected by public modules. Use at your own risk!</span><span>
</span><span id="line-17"></span><span class="hs-comment">--</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- Core stream fusion functionality for text.</span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Text.Internal.Fusion.Types</span><span>
</span><span id="line-21"></span><span>    </span><span class="hs-special">(</span><span>
</span><span id="line-22"></span><span>      </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier">CC</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-23"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#PairS"><span class="hs-identifier">PairS</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-24"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Scan"><span class="hs-identifier">Scan</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-25"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#RS"><span class="hs-identifier">RS</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-26"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Step"><span class="hs-identifier">Step</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-27"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier">Stream</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#empty"><span class="hs-identifier">empty</span></a></span><span>
</span><span id="line-29"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html"><span class="hs-identifier">Data.Text.Internal.Fusion.Size</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Word.html#"><span class="hs-identifier">Data.Word</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier">Word8</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span class="hs-comment">-- | Specialised tuple for case conversion.</span><span>
</span><span id="line-35"></span><span class="hs-keyword">data</span><span> </span><span id="CC"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier hs-var">CC</span></a></span></span><span> </span><span id="local-6989586621679105624"><span class="annot"><a href="#local-6989586621679105624"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="CC"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#CC"><span class="hs-identifier hs-var">CC</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679105624"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-comment">-- | Restreaming state.</span><span>
</span><span id="line-38"></span><span class="hs-keyword">data</span><span> </span><span id="RS"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#RS"><span class="hs-identifier hs-var">RS</span></a></span></span><span> </span><span id="local-6989586621679105622"><span class="annot"><a href="#local-6989586621679105622"><span class="hs-identifier hs-type">s</span></a></span></span><span>
</span><span id="line-39"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span id="RS0"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#RS0"><span class="hs-identifier hs-var">RS0</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679105622"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-40"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="RS1"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#RS1"><span class="hs-identifier hs-var">RS1</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679105622"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-41"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="RS2"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#RS2"><span class="hs-identifier hs-var">RS2</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679105622"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-42"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="RS3"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#RS3"><span class="hs-identifier hs-var">RS3</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679105622"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="hs-comment">-- | Strict pair.</span><span>
</span><span id="line-45"></span><span class="hs-keyword">data</span><span> </span><span id="PairS"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#PairS"><span class="hs-identifier hs-var">PairS</span></a></span></span><span> </span><span id="local-6989586621679105617"><span class="annot"><a href="#local-6989586621679105617"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span id="local-6989586621679105616"><span class="annot"><a href="#local-6989586621679105616"><span class="hs-identifier hs-type">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679105617"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span id="%3A%2A%3A"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679105616"><span class="hs-identifier hs-type">b</span></a></span><span>
</span><span id="line-46"></span><span>                 </span><span class="hs-comment">-- deriving (Eq, Ord, Show)</span><span>
</span><span id="line-47"></span><span class="hs-keyword">infixl</span><span> </span><span class="hs-number">2</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="hs-comment">-- | An intermediate result in a scan.</span><span>
</span><span id="line-50"></span><span class="hs-keyword">data</span><span> </span><span id="Scan"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Scan"><span class="hs-identifier hs-var">Scan</span></a></span></span><span> </span><span id="local-6989586621679105614"><span class="annot"><a href="#local-6989586621679105614"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Scan1"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Scan1"><span class="hs-identifier hs-var">Scan1</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679105614"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-51"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span id="Scan2"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Scan2"><span class="hs-identifier hs-var">Scan2</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679105614"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="hs-comment">-- | Intermediate result in a processing pipeline.</span><span>
</span><span id="line-54"></span><span class="hs-keyword">data</span><span> </span><span id="Step"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Step"><span class="hs-identifier hs-var">Step</span></a></span></span><span> </span><span id="local-6989586621679105644"><span class="annot"><a href="#local-6989586621679105644"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span id="local-6989586621679105643"><span class="annot"><a href="#local-6989586621679105643"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Done"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span></span><span>
</span><span id="line-55"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="Skip"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-var">Skip</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679105644"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-56"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="Yield"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-var">Yield</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679105643"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679105644"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span class="hs-comment">{-
instance (Show a) =&gt; Show (Step s a)
    where show Done        = &quot;Done&quot;
          show (Skip _)    = &quot;Skip&quot;
          show (Yield x _) = &quot;Yield &quot; ++ show x
-}</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span id="local-6989586621679105662"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679105606"><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679105662"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679105662"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-66"></span><span>    </span><span id="local-6989586621679105603"><span class="annot"><span class="annottext">== :: Stream a -&gt; Stream a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">(==)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Stream a -&gt; Stream a -&gt; Bool
forall a. Eq a =&gt; Stream a -&gt; Stream a -&gt; Bool
</span><a href="Data.Text.Internal.Fusion.Types.html#eq"><span class="hs-identifier hs-var">eq</span></a></span></span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span id="local-6989586621679105660"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679105587"><span id="local-6989586621679105589"><span id="local-6989586621679105591"><span id="local-6989586621679105593"><span id="local-6989586621679105595"><span id="local-6989586621679105597"><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-type">Ord</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679105660"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-type">Ord</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679105660"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-69"></span><span>    </span><span id="local-6989586621679105584"><span class="annot"><span class="annottext">compare :: Stream a -&gt; Stream a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var hs-var hs-var hs-var">compare</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Stream a -&gt; Stream a -&gt; Ordering
forall a. Ord a =&gt; Stream a -&gt; Stream a -&gt; Ordering
</span><a href="Data.Text.Internal.Fusion.Types.html#cmp"><span class="hs-identifier hs-var">cmp</span></a></span></span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span class="hs-comment">-- The length hint in a Stream has two roles.  If its value is zero,</span><span>
</span><span id="line-72"></span><span class="hs-comment">-- we trust it, and treat the stream as empty.  Otherwise, we treat it</span><span>
</span><span id="line-73"></span><span class="hs-comment">-- as a hint: it should usually be accurate, so we use it when</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- unstreaming to decide what size array to allocate.  However, the</span><span>
</span><span id="line-75"></span><span class="hs-comment">-- unstreaming functions must be able to cope with the hint being too</span><span>
</span><span id="line-76"></span><span class="hs-comment">-- small or too large.</span><span>
</span><span id="line-77"></span><span class="hs-comment">--</span><span>
</span><span id="line-78"></span><span class="hs-comment">-- The size hint tries to track the UTF-16 code units in a stream,</span><span>
</span><span id="line-79"></span><span class="hs-comment">-- but often counts the number of code points instead.  It can easily</span><span>
</span><span id="line-80"></span><span class="hs-comment">-- undercount if, for instance, a transformed stream contains astral</span><span>
</span><span id="line-81"></span><span class="hs-comment">-- plane code points (those above 0x10000).</span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span class="hs-keyword">data</span><span> </span><span id="Stream"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span></span><span> </span><span id="local-6989586621679105648"><span class="annot"><a href="#local-6989586621679105648"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-84"></span><span>    </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621679105649"><span class="annot"><a href="#local-6989586621679105649"><span class="hs-identifier hs-type">s</span></a></span></span><span class="hs-operator">.</span><span> </span><span id="Stream"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span></span><span>
</span><span id="line-85"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679105649"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Step"><span class="hs-identifier hs-type">Step</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679105649"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679105648"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>             </span><span class="hs-comment">-- stepper function</span><span>
</span><span id="line-86"></span><span>    </span><span class="hs-glyph">!</span><span class="annot"><a href="#local-6989586621679105649"><span class="hs-identifier hs-type">s</span></a></span><span>                          </span><span class="hs-comment">-- current state</span><span>
</span><span id="line-87"></span><span>    </span><span class="hs-glyph">!</span><span class="annot"><a href="Data.Text.Internal.Fusion.Size.html#Size"><span class="hs-identifier hs-type">Size</span></a></span><span>                       </span><span class="hs-comment">-- size hint in code units</span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="hs-comment">-- | /O(n)/ Determines if two streams are equal.</span><span>
</span><span id="line-90"></span><span id="local-6989586621679105580"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#eq"><span class="hs-identifier hs-type">eq</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679105580"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679105580"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679105580"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span></span><span>
</span><span id="line-91"></span><span id="eq"><span class="annot"><span class="annottext">eq :: forall a. Eq a =&gt; Stream a -&gt; Stream a -&gt; Bool
</span><a href="Data.Text.Internal.Fusion.Types.html#eq"><span class="hs-identifier hs-var hs-var">eq</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679105578"><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105578"><span class="hs-identifier hs-var">next1</span></a></span></span><span> </span><span id="local-6989586621679105577"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105577"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679105576"><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105576"><span class="hs-identifier hs-var">next2</span></a></span></span><span> </span><span id="local-6989586621679105575"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105575"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Bool
</span><a href="#local-6989586621679105574"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105578"><span class="hs-identifier hs-var">next1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105577"><span class="hs-identifier hs-var">s1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105576"><span class="hs-identifier hs-var">next2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105575"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-92"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-93"></span><span>      </span><span id="local-6989586621679105574"><span class="annot"><span class="annottext">loop :: Step s a -&gt; Step s a -&gt; Bool
</span><a href="#local-6989586621679105574"><span class="hs-identifier hs-var hs-var">loop</span></a></span></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-94"></span><span>      </span><span class="annot"><a href="#local-6989586621679105574"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679105572"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105572"><span class="hs-identifier hs-var">s1'</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679105571"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105571"><span class="hs-identifier hs-var">s2'</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Bool
</span><a href="#local-6989586621679105574"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105578"><span class="hs-identifier hs-var">next1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105572"><span class="hs-identifier hs-var">s1'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105576"><span class="hs-identifier hs-var">next2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105571"><span class="hs-identifier hs-var">s2'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-95"></span><span>      </span><span class="annot"><a href="#local-6989586621679105574"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679105570"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105570"><span class="hs-identifier hs-var">s1'</span></a></span></span><span class="hs-special">)</span><span>     </span><span id="local-6989586621679105569"><span class="annot"><span class="annottext">Step s a
</span><a href="#local-6989586621679105569"><span class="hs-identifier hs-var">x2</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Bool
</span><a href="#local-6989586621679105574"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105578"><span class="hs-identifier hs-var">next1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105570"><span class="hs-identifier hs-var">s1'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Step s a
</span><a href="#local-6989586621679105569"><span class="hs-identifier hs-var">x2</span></a></span><span>
</span><span id="line-96"></span><span>      </span><span class="annot"><a href="#local-6989586621679105574"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span id="local-6989586621679105568"><span class="annot"><span class="annottext">Step s a
</span><a href="#local-6989586621679105568"><span class="hs-identifier hs-var">x1</span></a></span></span><span>             </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679105567"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105567"><span class="hs-identifier hs-var">s2'</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Bool
</span><a href="#local-6989586621679105574"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><a href="#local-6989586621679105568"><span class="hs-identifier hs-var">x1</span></a></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105576"><span class="hs-identifier hs-var">next2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105567"><span class="hs-identifier hs-var">s2'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-97"></span><span>      </span><span class="annot"><a href="#local-6989586621679105574"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><span class="hs-identifier">_</span></span><span>                        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-98"></span><span>      </span><span class="annot"><a href="#local-6989586621679105574"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><span class="hs-identifier">_</span></span><span>    </span><span class="annot"><span class="annottext">Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-99"></span><span>      </span><span class="annot"><a href="#local-6989586621679105574"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679105566"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679105566"><span class="hs-identifier hs-var">x1</span></a></span></span><span> </span><span id="local-6989586621679105565"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105565"><span class="hs-identifier hs-var">s1'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679105564"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679105564"><span class="hs-identifier hs-var">x2</span></a></span></span><span> </span><span id="local-6989586621679105563"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105563"><span class="hs-identifier hs-var">s2'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679105566"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679105564"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span>
</span><span id="line-100"></span><span>                                           </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Bool
</span><a href="#local-6989586621679105574"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105578"><span class="hs-identifier hs-var">next1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105565"><span class="hs-identifier hs-var">s1'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105576"><span class="hs-identifier hs-var">next2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105563"><span class="hs-identifier hs-var">s2'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-101"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#eq"><span class="hs-pragma hs-type">eq</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span id="local-6989586621679105561"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#cmp"><span class="hs-identifier hs-type">cmp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-type">Ord</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679105561"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679105561"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679105561"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span></span><span>
</span><span id="line-104"></span><span id="cmp"><span class="annot"><span class="annottext">cmp :: forall a. Ord a =&gt; Stream a -&gt; Stream a -&gt; Ordering
</span><a href="Data.Text.Internal.Fusion.Types.html#cmp"><span class="hs-identifier hs-var hs-var">cmp</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679105559"><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105559"><span class="hs-identifier hs-var">next1</span></a></span></span><span> </span><span id="local-6989586621679105558"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105558"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span id="local-6989586621679105557"><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105557"><span class="hs-identifier hs-var">next2</span></a></span></span><span> </span><span id="local-6989586621679105556"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105556"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Ordering
</span><a href="#local-6989586621679105555"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105559"><span class="hs-identifier hs-var">next1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105558"><span class="hs-identifier hs-var">s1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105557"><span class="hs-identifier hs-var">next2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105556"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-105"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-106"></span><span>      </span><span id="local-6989586621679105555"><span class="annot"><span class="annottext">loop :: Step s a -&gt; Step s a -&gt; Ordering
</span><a href="#local-6989586621679105555"><span class="hs-identifier hs-var hs-var">loop</span></a></span></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span>
</span><span id="line-107"></span><span>      </span><span class="annot"><a href="#local-6989586621679105555"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679105553"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105553"><span class="hs-identifier hs-var">s1'</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679105552"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105552"><span class="hs-identifier hs-var">s2'</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Ordering
</span><a href="#local-6989586621679105555"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105559"><span class="hs-identifier hs-var">next1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105553"><span class="hs-identifier hs-var">s1'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105557"><span class="hs-identifier hs-var">next2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105552"><span class="hs-identifier hs-var">s2'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-108"></span><span>      </span><span class="annot"><a href="#local-6989586621679105555"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679105551"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105551"><span class="hs-identifier hs-var">s1'</span></a></span></span><span class="hs-special">)</span><span>     </span><span id="local-6989586621679105550"><span class="annot"><span class="annottext">Step s a
</span><a href="#local-6989586621679105550"><span class="hs-identifier hs-var">x2</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Ordering
</span><a href="#local-6989586621679105555"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105559"><span class="hs-identifier hs-var">next1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105551"><span class="hs-identifier hs-var">s1'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Step s a
</span><a href="#local-6989586621679105550"><span class="hs-identifier hs-var">x2</span></a></span><span>
</span><span id="line-109"></span><span>      </span><span class="annot"><a href="#local-6989586621679105555"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span id="local-6989586621679105549"><span class="annot"><span class="annottext">Step s a
</span><a href="#local-6989586621679105549"><span class="hs-identifier hs-var">x1</span></a></span></span><span>             </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Skip"><span class="hs-identifier hs-type">Skip</span></a></span><span> </span><span id="local-6989586621679105548"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105548"><span class="hs-identifier hs-var">s2'</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Ordering
</span><a href="#local-6989586621679105555"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><a href="#local-6989586621679105549"><span class="hs-identifier hs-var">x1</span></a></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105557"><span class="hs-identifier hs-var">next2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105548"><span class="hs-identifier hs-var">s2'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-110"></span><span>      </span><span class="annot"><a href="#local-6989586621679105555"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><span class="hs-identifier">_</span></span><span>                        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span>
</span><span id="line-111"></span><span>      </span><span class="annot"><a href="#local-6989586621679105555"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="annot"><span class="annottext">Step s a
</span><span class="hs-identifier">_</span></span><span>    </span><span class="annot"><span class="annottext">Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span>
</span><span id="line-112"></span><span>      </span><span class="annot"><a href="#local-6989586621679105555"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679105547"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679105547"><span class="hs-identifier hs-var">x1</span></a></span></span><span> </span><span id="local-6989586621679105546"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105546"><span class="hs-identifier hs-var">s1'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Yield"><span class="hs-identifier hs-type">Yield</span></a></span><span> </span><span id="local-6989586621679105545"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679105545"><span class="hs-identifier hs-var">x2</span></a></span></span><span> </span><span id="local-6989586621679105544"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105544"><span class="hs-identifier hs-var">s2'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-113"></span><span>          </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#compare"><span class="hs-identifier hs-var">compare</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679105547"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679105545"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-114"></span><span>            </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Step s a -&gt; Step s a -&gt; Ordering
</span><a href="#local-6989586621679105555"><span class="hs-identifier hs-var">loop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105559"><span class="hs-identifier hs-var">next1</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105546"><span class="hs-identifier hs-var">s1'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">s -&gt; Step s a
</span><a href="#local-6989586621679105557"><span class="hs-identifier hs-var">next2</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679105544"><span class="hs-identifier hs-var">s2'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-115"></span><span>            </span><span id="local-6989586621679105543"><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679105543"><span class="hs-identifier hs-var">other</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="#local-6989586621679105543"><span class="hs-identifier hs-var">other</span></a></span><span>
</span><span id="line-116"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#cmp"><span class="hs-pragma hs-type">cmp</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="hs-comment">-- | The empty stream.</span><span>
</span><span id="line-119"></span><span id="local-6989586621679105651"><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#empty"><span class="hs-identifier hs-type">empty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679105651"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-120"></span><span id="empty"><span class="annot"><span class="annottext">empty :: forall a. Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#empty"><span class="hs-identifier hs-var hs-var">empty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(() -&gt; Step () a) -&gt; () -&gt; Size -&gt; Stream a
forall a s. (s -&gt; Step s a) -&gt; s -&gt; Size -&gt; Stream a
</span><a href="Data.Text.Internal.Fusion.Types.html#Stream"><span class="hs-identifier hs-var">Stream</span></a></span><span> </span><span class="annot"><span class="annottext">() -&gt; Step () a
forall {p} {s} {a}. p -&gt; Step s a
</span><a href="#local-6989586621679105540"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Size
</span><span class="hs-number">0</span></span><span>
</span><span id="line-121"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679105540"><span class="annot"><span class="annottext">next :: p -&gt; Step s a
</span><a href="#local-6989586621679105540"><span class="hs-identifier hs-var hs-var">next</span></a></span></span><span> </span><span class="annot"><span class="annottext">p
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Step s a
forall s a. Step s a
</span><a href="Data.Text.Internal.Fusion.Types.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span>
</span><span id="line-122"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Data.Text.Internal.Fusion.Types.html#empty"><span class="hs-pragma hs-type">empty</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-123"></span></pre></body></html>